<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			//主机
			console.log(location.host);
			//协议
			console.log(location.protocol);
			//端口
			console.log(location.port);
			//url
			console.log(location.href);
			//hash
			console.log(location.hash);
		</script>
	</head>
	<body>
		<button>reload</button>
		<script type="text/javascript">
			var btn = document.querySelector("button");
			btn.addEventListener('click', function() {
				// location.reload();//刷新
				location.replace("https://www.atstudy.com");//替换
			})
		</script>
	</body>
</html>
